﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Press.MVC.Data;
using System.Reflection;
using System.Runtime.Serialization;
using System.Linq.Expressions;

namespace Press.MVC.Data
{
    public class TestBlogRepository : IBlogRepository
    {
        public IQueryable<Blog> GetBlogs()
        {
            IList<Blog> blogresult = new List<Blog>();

            // Comment out the For loop which adds test blogs to the List
            // This should(will) result in the test failing
            for (int i = 1; i <= 5; i++)
            {
                Blog b = new Blog();
                b.ID = i;
                b.Name = "Test Blog Name: " + i.ToString();

                // Add the Blog to the list

                blogresult.Add(b);
            }

            return blogresult.AsQueryable<Blog>();
        }

        public IQueryable<Post> GetPosts()
        {
            IList<Post> postresult = new List<Post>();
            return postresult.AsQueryable<Post>();
        }
        public IQueryable<PostComment> GetPostComments()
        {
            IList<PostComment> pcresult = new List<PostComment>();
            return pcresult.AsQueryable<PostComment>();
        }

        public IQueryable<PostCategory> GetPostCategories()
        {
            IList<PostCategory> pcresult = new List<PostCategory>();
            return pcresult.AsQueryable<PostCategory>();
        }

        public IQueryable<BlogUserMap> GetBlogUserMap()
        {
            IList<BlogUserMap> bum = new List<BlogUserMap>();
            return bum.AsQueryable<BlogUserMap>();
        }

        public IQueryable<AspNetUser> GetAspNetUsers()
        {
            IList<AspNetUser> au = new List<AspNetUser>();
            return au.AsQueryable<AspNetUser>();
        }


        public void SavePost(Post p)
        { 
        
        }

        public void SaveBlog(Blog b)
        { 
        
        }

        public void DeletePost(int i)
        { 
        }

        public void SavePostCategory(PostCategory pc)
        { 
        
        }

        public void SavePostComment(PostComment pc)
        { 
        
        }
    }
}
